package com.huixiaodian.baselibrary.ft_user.service.impl;

import android.content.Context;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.launcher.ARouter;
import com.huixiaodian.baselibrary.ft_user.service.LoginService;

public class LoginImpl {

    @Autowired(name = "/login/login_center")
    protected LoginService loginService;

    private static LoginImpl loginImpl;

    private LoginImpl() {
        ARouter.getInstance().inject(this);
    }

    public static LoginImpl getInstance() {
        if (loginImpl == null) {
            synchronized (LoginImpl.class) {
                if (loginImpl == null)
                    loginImpl = new LoginImpl();
            }
        }
        return loginImpl;
    }

    public void startLoginActivity(Context context){
        loginService.startLoginActivity(context);
    }

    public void startUserInfoActivity(Context context){
        loginService.startUserInfoActivity(context);
    }

    public void startUserSafetyActivity(Context context){
        loginService.startUserSafetyActivity(context);
    }
}
